USE[DeltaFlex]
GO
IF(OBJECT_ID('dbo.sp_CercarNextIdFactura')IS NOT NULL)
	DROP PROCEDURE dbo.sp_CercarNextIdFactura
GO

CREATE PROCEDURE sp_CercarNextIdFactura
AS
BEGIN
	SET NOCOUNT ON
	SELECT NEXT VALUE FOR SEQ_FACTURA as IDFACTURA;
	END 
GO